package com.wymobilearchitecture.heade_frist.adapter.duck;

import com.wymobilearchitecture.heade_frist.adapter.Duck;
import com.wymobilearchitecture.heade_frist.adapter.behavior.FlyWithNo;
import com.wymobilearchitecture.heade_frist.adapter.behavior.QuackWithMute;

/**
 * 橡胶鸭子
 */
public class RubberDuck extends Duck {

    public RubberDuck(){
        flyBehavior = new FlyWithNo();
        quackBehavior = new QuackWithMute();
    }

    @Override
    protected void display() {
        System.out.println("display: 黄头");
    }


    //针对实现编程
    @Override
    protected void quack() {

        System.out.println("不会叫");
    }

}
